const path = require('path')

// 转发接口
const proxyIp = 'http://192.168.1.105:4000';

module.exports = {
  alias: {
    '/@/': path.resolve(__dirname, './src')
  },
  proxy: {// 配置多个代理(配置一个 proxy: 'http://localhost:4000' )
    '/api': {
      target: proxyIp,
      ws: true,
      changeOrigin: true,
      pathRewrite: {
        '^/api': '/mock'
      }
    },
    '/foo': {
      target: proxyIp
    }
  }
}